package com.bs.core;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.bs.dao.UserDao;
import com.bs.dao.impl.UserinfoDaoImpl;
import com.bs.entity.User;


public class Main {
	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext(
				new String[]{
						"applicationContext-config.xml"	,
						"applicationContext-dataSource.xml", 
						"applicationContext-dao.xml"						
						});
		UserDao userdao = (UserinfoDaoImpl) ctx.getBean("userDao");
		System.out.println("------------------------------------");
		System.out.println("userdao:"+userdao);
		User user = new User();
		//user.setUserName("zs");
		user.setLoginName("zs");
		user.setUserPassword("123");
		userdao.getUser(user);
	}

}
